import web

def station_name(code):
    return code

def ticket_status(pnr):
    #return "BAD RESULT"
    status = web.storage()
    status.pnr_number = pnr[:3] + "-" + pnr[3:]
    status.journey_date = '19-10-2007'
    status.train = web.storage(
        number=7604, 
        name='KACHEGUDA EXP'.title(), 
        to=station_name('KCG'), 
        frm=station_name('YPR'), 
        klass='SL')
    status.passengers = [web.storage(booking_status='W/L 3 ,GNWL', current_status='RAC 35', passenger=1)]
    status.chart_status=["not prepared"]
    return status
